home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1996 #3 / AmigaPlus_CD-ROM-EXTRA_Nr.3.bin / aminet-spiele / zwei spieler / stratec-chess / programmers.doc next >
Text File  |  1993-03-08  |  4KB  |  85 lines

  1. ==============================================================================
  2. ENGLISH ONLY: The Strateq + AI Competition!
  3. ==============================================================================
  4.  
  5. Even if I decide to actually write the Strateq + version, I won't invent an AI
  6. routine for it myself. That is for you other AMOS programmers out there to do.
  7.  
  8. Send in your routines in either ASCII or AMOS form, preferably fully
  9. commented, and I shall possibly even use them, with the reward of mentioning
  10. your name in Strateq + ! If you want money for your routines, say so and I
  11. just might see what I can do about it.
  12.  
  13. ------------------------------------------------------------------------------
  14. AMOS-talk about the program
  15. ------------------------------------------------------------------------------
  16.  
  17. First, you should only use very weird variable, procedure and label names such
  18. as JEEP or CAULIFLOWER as your own names to avoid confusion with my names.
  19.  
  20. Second, here are the common numeral values for the pieces.
  21. 0=Soldier       1=Warrior           2=YIN           3=YANG
  22. 4=Equestrian    5=Pegasus           6=Emperor       7=Empress
  23. 8=Wraith        9=Warlord           10=Battleship   11=Dreadnought
  24. 12=Leviathan    13=Construction Dock14=Main Factory
  25.  
  26. Third, here is a list of my variables, procedures and routines.
  27.  
  28. Variables:
  29.     TURN                    whichever player is currently in charge (0 or 1)
  30.     OB(11,11)               an array which shows the board's contents:
  31.                             bits 0-1: what kind of piece/chip?
  32.                                 0 = 1-square piece / no chip
  33.                                 1 = 2-square piece l / chip 1
  34.                                 2 = 2-square piece r / chip 2
  35.                                 3 = 4-square piece / chip 3
  36.                                 4 = chip 4
  37.                             bits 2-3: piece or chip?
  38.                                 0 = piece of player 1
  39.                                 4 = piece of player 2
  40.                                 8 = chip
  41.                                12 = chip
  42.                             bit 4: is the square available?
  43.     SH(63,1)                the shapes of 64 pieces in one side (0...15)
  44.                             substract 1 to gain num / 0 = no piece
  45.     XY(63,1)                the positions of 64 pieces (X+(16*Y))
  46.     ALF(63,1)               the armour left of 64 pieces
  47.     OWN, NME                include 0 and 4 or vice versa dep. on TURN
  48.     MONEY(1)                players' money
  49.     PRI(14),BOU(14)         the prices and bounties of the piece types
  50.     ARM(14),STR(14)         the armour ratings and strengths of the types
  51.     EMPDEAD(1)              how many Imperials of a player have died
  52.  
  53. Functions:
  54.     FnIS(x,y)               OB(x,y) and 12
  55.     FnWH(x,y)               OB(x,y) and 3
  56.  
  57. Procedures:
  58.     AVAIL[x,y]              Make (x,y) available for 1-square piece
  59.     LONGAVAIL[x,y]          Make (x,y) available for 2-square piece
  60.                             (square is piece's left edge)
  61.     FLUSHBOARD              Remove all avail-bits
  62.     PIC[num,x,y,sel]        Draw piece number num at (x,y)
  63.                             Set sel to 1 for selected image
  64.                             Use num=-1 for empty squares
  65.     NEWPIECE[num,x,y]       Make new piece (type num) at x,y
  66.     WHATPIECE[x,y]          Finds out what piece is in (x,y) and returns its
  67.                             number (used with the SH(), ALF() and XY()
  68.                             arrays) in variable N
  69.  
  70. Routines:
  71.     MOVEMENT                Calculate all possible moves for piece
  72.                             (set variables PX & PY to piece's coordinates
  73.                             and variable NUM to piece's type)
  74.     MOVE                    move piece from PX,PY to QX,QY
  75.     FIGHT                   Attack a piece at EX,EY (for 2-square pieces,
  76.                             set variable SHIP to -1)
  77.  
  78. That was all. Now get programming!
  79. See you later in another documentation!
  80.  
  81. Remember that I am open to any questions about this programming-type thing.
  82.  
  83. So long!
  84.             - JIPsoft
  85.